package cn.sinjet.utils;

import com.mgroup.wazehelper.R;

import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

public class ToastUtil {
     public static void showToast(Context context,String content){
    	 View view = LayoutInflater.from(context).inflate(R.layout.view_toast, null);
    	 TextView tv = (TextView)view.findViewById(R.id.toast_text);
    	 tv.setText(content);
    	 Toast toast = new Toast(context);
    	 toast.setDuration(Toast.LENGTH_SHORT);
    	 toast.setGravity(Gravity.CENTER, Gravity.CENTER, Gravity.CENTER);
    	 toast.setView(view);
    	 toast.show();
     }
}
